<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
	<head>
		<jsp:include page="../inc.jsp"></jsp:include>
		<meta http-equiv="X-UA-Compatible" content="edge" />
		<title>收款结算-按单号</title>
		<style>
		  ul,li{
            list-style: none;
        }
        a{
            text-decoration: none;
        }
       /* .controlSize{

            min-height:100px;
            _height:100px;
            padding:0;
        }*/
        .payInformartion{
			width:1100px;
            height:30px;
           
        }
        .payInformartion li{
            height:40px;
            line-height: 40px;
            font-size: 14px;
          
        } 
   		
		</style>
		<script type="text/javascript">
		$(function(){
			$("#pssorderNumber").text('${cashNo}');
			$("#payMent").datagrid({
			    url : '${ctx}/statement/order/${cashNo}?temp='+Math.random(),
			    striped : true,
			  //  fit : false,
			  //  fitColumns: true,
			    singleSelect : true,
			    method : 'get',
			    showFooter: true,
			    columns:[ [ {
			        width : '80',
			        title : 'id',
			        align : 'center',
			        field : 'id',
			        hidden:true
			    },{
			        width : '180',
			        title : '平台单号',
			        align : 'center',
			        field : 'orderNumber'
			    },{
			     width : '180',
			     title : '供应商单号',
			     align : 'center',
			     field : 'pssOrderNumber'
			     },{
			        width : '160',
			        title : '供应商/采购商',
			        align : 'center',
			        field : 'act_pay',
			        formatter: function(value,row){
			        	if(row.orderNumber!="总计"){
			            return "<span>卖："+row.saler+"</span>"+"<br/>"+
			            "<span>买："+row.buyer+"</span>";
			        	}
			        }
			    },{
			        width : '130',
			        title : '订单金额/人数',
			        align : 'center',
			        field : 'act_sum',
			        formatter:function(value,row){
			        	if(row.orderNumber!="总计"){
			            return "￥"+row.unitPrice+"/"+row.purchQuantity+"人";
			        	}
			        }
			    },{
			        width : '100',
			        title : '应收金额',
			        align : 'center',
			        field : 'sum',
			        formatter:function(value,row){
			            return "￥"+row.sum;
			        }
			    },{
			        width : '100',
			        title : '支付日期',
			        align : 'center',
			        field : 'payDate'
			    },{
			        width : '100',
			        title : '订单状态',
			        align : 'center',
			        field : 'orderStatus',
			        formatter: function(value,row){
			            switch(row.orderStatus+""){
			                case "0":
			                    return "待支付";
			                    break;
			                case "1":
			                    return "待审核";
			                    break;
			                case "2":
			                    return "待出票";
			                    break;
			                case "3":
			                    return "出票中";
			                    break;
			                case "4":
			                    return "出票成功";
			                    break;
			                case "5":
			                    return "取消";
			                    break;
			            }
			        }
			    },{
			        width : '120',
			        title : '财务状态',
			        align : 'center',
			        field : 'financeStatus',
			        formatter: function(value,row){
			            switch(row.financeStatus+""){
			                case "1":
			                    return "收款待审核";
			                    break;
			                case "2":
			                    return "已收款";
			                    break;
			                case "3":
			                    return "待提现";
			                    break;
			                case "4":
			                    return "提现待审核";
			                    break;
			                case "5":
			                    return "提现待支付";
			                    break;
			                case "6":
			                    return "已付款";
			                    break;
			            }
			        }
			    }
			    ] ]
			});
			
			
		});
		
		</script>
	</head>
	<body style="padding:0px;">
	<div>
    <ul class="payInformartion">
        <li>结算单号:<span id="pssorderNumber"></span></li>
    </ul>

    
            <table id="payMent"></table>
	</div>
	
	</body>
</html>